package com.wwwarehouse.contract.program_operation;

import android.app.Dialog;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;

import com.wwwarehouse.common.activity.base.BaseActivity;
import com.wwwarehouse.common.tools.DialogTools;
import com.wwwarehouse.contract.core.ContractConstant;

import contract.wwwarehouse.com.contract.R;

public class ContractGuidePageActivity extends BaseActivity {

    private LinearLayout mLlGuidePage;
    private int mCount;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        sp.putBooleanValue(ContractConstant.SP_KEY_PROGRAM_POERATION_GUIDE , true);
        setContentView(R.layout.activity_contract_guide_page);

        mLlGuidePage = findView(R.id.ll_guidepage);
	    DialogTools.getInstance().showCustomWarning(this, "", "规划业务提示：\n 1.为了给您的团队提供更合身的功能，你需要\n 描绘所处“顶级业务单位”的业务轮廓。\n " +
					    "2.禁止：为避免您无法获取需要的系统功能，\n请不要随意修改或选择业务轮廓的内容。 ","我知道了", true, new DialogTools.ConfirmListener() {
				    @Override
				    public void setConfirmListener(Dialog dialog, View view, String s) {
					    dialog.dismiss();
				    }
			    }
	    );
        mLlGuidePage.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                switch (mCount) {
                    case 0:
                        mLlGuidePage.setBackgroundResource(R.drawable.guide_two);
                        break;
                    case 1:
                        mLlGuidePage.setBackgroundResource(R.drawable.guide_three);
                        break;
                    case 2:
                        mLlGuidePage.setBackgroundResource(R.drawable.guide_four);
                        break;
                    case 3:
                        mLlGuidePage.setBackgroundResource(R.drawable.guide_five);
                        break;
                    case 4:
                        mLlGuidePage.setBackgroundResource(R.drawable.guide_six);
                        break;
                    case 5:
                        mLlGuidePage.setBackgroundResource(R.drawable.guide_seven);
                        break;
                    default:
                        finish();
                        break;
                }
                mCount++;
            }
        });
    }
}
